
chcp 65001
@echo off
set AAPTPATH="D:\SDK\build-tools\28.0.3\aapt.exe"

REM 判断文件是否为APK文件
set "ArgOfFilePath=%1"
if not exist "%ArgOfFilePath%" (
    echo 文件不存在：%ArgOfFilePath%
    pause
)

set "file_extension=%~x1"
if /I "%file_extension%" neq ".apk" (
    echo 当前文件不是APK包：%ArgOfFilePath%
    pause
)

REM 执行aapt命令
set "CMD=%AAPTPATH% dump badging %ArgOfFilePath%"
echo 执行命令：%CMD%
%CMD%

pause
